package com.kgw.gatewaybluetooth;

import android.content.SharedPreferences;

/**
 * Created by Jayden on 2016/7/5 17:12.
 *
 * @version V1.0
 * @Title: GbPreferences
 * @Description: ${todo}
 */
public class GbPreferences {
    private static final String KEY_TIMESTAMP = "timeStamp";

    public static String getTimeStamp() {
        return getString(KEY_TIMESTAMP);
    }


    public static void saveTimeStamp(String paramString) {
        saveString(KEY_TIMESTAMP, paramString);
    }


    static SharedPreferences getSharedPreferences() {
        return GbCache.getContext().getSharedPreferences("Sample", 0);
    }

    private static String getString(String paramString) {
        return getSharedPreferences().getString(paramString, null);
    }

    private static void saveString(String paramString1, String paramString2) {
        SharedPreferences.Editor localEditor = getSharedPreferences().edit();
        localEditor.putString(paramString1, paramString2);
        localEditor.commit();
    }
}
